// scaup - Scala up!
// (c) 2009, Normen Müller, normen.mueller@gmail.com  
// $Id: EQ.scala 40 2009-11-10 18:59:19Z normen.mueller $
package scaup.draft.eq

import java.io.File

import scaup.Views._

/** This object provides a simple interface to the equivalence system parser class.
 * 
 * @thanks Serge Autexier for their initial discussions on the declartive syntax.
 * @author <a href="mailto:normen.mueller@googlemail.com">Normen M&#xFC;ller</a>
 * @version 0.0.2 */
object EquivalenceSystemParser extends Parser {
    
  def parse[T](description: File, system: EquivalenceSystem[T]) = phrase(eq(system))(new lexical.Scanner(description.content)) match {
    case Success(result, _) => result
    case n@_                => throw new Exception("GM parsing error: " + n)
  }
  
}
